Skip to content

cu-rrt-star component + closed-loop Rerun navigation demo - #2

Open
Scofield626 wants to merge 7 commits into
masterfrom
anytime-rrt-star-component
Open

cu-rrt-star component + closed-loop Rerun navigation demo#2
Scofield626 wants to merge 7 commits into
masterfrom
anytime-rrt-star-component

Conversation

@Scofield626

Copy link
Copy Markdown
Owner

Restructure of the anytime RRT* example (copper-project#1247) into a reusable component plus a visual example, for local testing before updating the upstream PR.

components/tasks/cu_rrt_star (cu-rrt-star) — the planner as a proper component:

  • RrtStarPlanner (CuAnytimeTask) consumes cu_rrt_star::PlanRequest, publishes cu_rrt_star::PlanPath.
  • The map travels in the request ([Obstacle; MAX_OBSTACLES = 16]), so the planner has no built-in map and a source can change it between jobs. With gamma: 0.0 the rewiring constant is derived per job from the map received.
  • The quick-vs-thorough policy comparison moved into tests/rrt_star_tester.rs, so cargo test -p cu-rrt-star still exercises the full anytime runtime path in CI.

examples/cu_anytime_rrt_star — closed-loop navigation demo using the component:

  • A point robot patrols three corners of the depot map. Every copperlist, NavSim advances the robot along the newest published path and replans from the robot's current pose; RerunViewer draws obstacles, robot + trail, goal, the current best path, and per-cycle quality/iteration curves.
  • Runs paced by rate_target_hz: 20 until Ctrl-C.

To try it:

cargo install rerun-cli --locked
cargo run --release -p cu-anytime-rrt-star

Headless: add "rrd": "demo.rrd" to the viewer's config: block to record to a file instead of spawning a viewer.

Note: cu-rrt-star is the first out-of-core crate implementing CuAnytimeTask; the trait is not in the prelude and much of cutask_anytime is #[doc(hidden)], so docs.rs links from the component point into a barely-surfaced API.

Same seeded RRT* task on two nodes: a quick policy (2 quanta, quality
target) and a thorough one (24 quanta, stall bound). base() publishes the
first path, each refine() runs one block of iterations and republishes only
a shorter one.
write_path shortcuts the tree path instead of dropping its tail, so every
published segment is collision free; a path that still does not fit is not
published at all. gamma: 0.0 derives the rewiring constant from the free
area, which lifts the thorough planner from q=0.90 to q=0.96.

The example's self-check now runs as a test, and a planner node exposes a
small debug state instead of its whole tree.
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

Hi! Thanks for opening this pull request.

Because this is your first time contributing to this repository, please read our contributor guide:
https://github.com/copper-project/copper-rs/blob/master/CONTRIBUTING.md

@Scofield626
Scofield626 force-pushed the anytime-rrt-star-component branch from 4991a44 to feaae1b Compare August 3, 2026 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant